import { createStore } from "vuex";

export default createStore({
  state: {
    hours: localStorage.getItem("games")
      ? localStorage.getItem("games").split(",").length * 11
      : 0,
  },
  getters: {},
  action: {},
  mutations: {
    changehours(state, payload) {
      if (payload) {
        state.hours -= 11;
      } else {
        state.hours += 11;
      }
    },
  },
  modules: {},
});
